package pack0826;

import java.util.Stack;

public class DemoC {
    public static void a(){
        Stack<String> stack = new Stack<>();
        stack.add("aaa");
        stack.add("bbb");
        stack.add("ccc");
        System.out.println(stack);
        String s1 = stack.pop();
        System.out.println(stack);
        System.out.println(s1);
        String s2 = stack.peek();
        System.out.println(stack);
        System.out.println(s2);
    }

    public static void main(String[] args) {
        a();
    }
}
